Data Types

The data types and isolation levels supported by the .NET data provider depend on the data store to which you are connecting.

Table 10-1 lists the data types supported by the .NET data provider and how they are mapped to the .NET Framework types. You can use the table to infer the data types that will be used when a DataSet is filled using a DataAdapter. This table also identifies the proper accessors for accessing the data when a DataReader object is used directly.

Mapping Parameter Data Types

The type of the parameter is specific to each data provider. The .NET data provider must convert the parameter value to a native format before sending it to the server. The best way for an application to describe a parameter is to use the data provider-specific type enumeration.

In generic programming circumstances, the data provider-specific type may not be available. When no provider-specific DB type has been specified, the data type will be inferred from either the System.Data.DbType or from the .NET framework type of the parameter's value.

The .NET data provider uses the following order when inferring the data type of a parameter:

Table 10-2 shows how SequeLink infers its types if only the System.Data.DbType is specified.

Table 10-2. Mapping of the System.Data.DbTypes to SequeLinkDbTypes  
System.Data.DbType
SequeLinkDbType
AnsiString
VarChar
AnsiStringFixedLength
Char
Binary
VarBinary
Boolean
Bit
Byte
Byte
Currency
Decimal
Date
Date
DateTime
TimeStamp
Decimal
Decimal
Double
Double
Guid
Not supported
Int16
SmallInt
Int32
Int
Int64
BigInt
Object
Not supported
Sbyte
Byte
Single
Single
String
VarChar
StringFixedLength
Char
Time
Time
Uint16
Int
Uint32
Decimal
Uint64
Decimal
VarNumeric
Not supported

Table 10-3 shows the mapping that the data provider uses to infer a data type if neither the provider-specific data type or the System.Data.DbType are provided.

Table 10-3. Mapping .NET Framework Data Types to SequeLinkDbTypes  
.NET Framework Type
SequeLinkDbType
Boolean
Bit
Byte
Byte
Byte[]
Varbinary
Char, Char[]
Not supported
DateTime
TimeStamp
Decimal
Decimal
Double
Double
Guid
Not supported
Int16
SmallInt
Int32
Int
Int64
BigInt
Object
Not supported
Single
Single
String
VarChar
Timespan
Time
Uint16
Int
Uint32
Decimal
Uint64
Decimal